In general, optical sensors configured to detect presence of detection target objects such as fingers, hands, and the like using light-emitting elements and light-receiving elements are known (for example, see Patent Document 1). The known optical sensor detects the presence of a detection target object in the following manner: that is, light is outputted from a light-emitting element and reflected by the detection target object, and the reflected light is then received by a light-receiving element, through which the presence of the detection target object is detected. Meanwhile in the optical sensor, in the case where light outputted from the light-emitting element enters the light-receiving element without striking the detection target object, such light can cause an erroneous detection.
In order to reduce influence of such stray light, in an optical sensor disclosed in Patent Document 1, lenses are provided above a light-emitting element and a light-receiving element, respectively, and an optical shield is disposed covering these lenses so that the light-emitting element and the light-receiving element are optically isolated from each other with an optical barrier of the optical shield.
Patent Document 1: Japanese Unexamined Patent Application Publication No. 2011-180121
The optical sensor disclosed in Patent Document 1 needs light shielding members such as an optical shield, an optical barrier, and the like in order to isolate a light-emitting element and a light-receiving element from each other, thereby increasing manufacturing costs. In addition, there arises a problem that using these members prevents the optical sensor from being miniaturized.